// $ANTLR 3.3 Nov 30, 2010 12:50:56 /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g 2012-03-19 13:17:40

import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

public class PLLexer extends Lexer {
    public static final int EOF=-1;
    public static final int T__10=10;
    public static final int T__11=11;
    public static final int NUM=4;
    public static final int PLUS=5;
    public static final int SUB=6;
    public static final int MULT=7;
    public static final int DIV=8;
    public static final int WS=9;

    // delegates
    // delegators

    public PLLexer() {;} 
    public PLLexer(CharStream input) {
        this(input, new RecognizerSharedState());
    }
    public PLLexer(CharStream input, RecognizerSharedState state) {
        super(input,state);

    }
    public String getGrammarFileName() { return "/home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g"; }

    // $ANTLR start "T__10"
    public final void mT__10() throws RecognitionException {
        try {
            int _type = T__10;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:3:7: ( '(' )
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:3:9: '('
            {
            match('('); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "T__10"

    // $ANTLR start "T__11"
    public final void mT__11() throws RecognitionException {
        try {
            int _type = T__11;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:4:7: ( ')' )
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:4:9: ')'
            {
            match(')'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "T__11"

    // $ANTLR start "PLUS"
    public final void mPLUS() throws RecognitionException {
        try {
            int _type = PLUS;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:24:6: ( 'add' | '+' )
            int alt1=2;
            int LA1_0 = input.LA(1);

            if ( (LA1_0=='a') ) {
                alt1=1;
            }
            else if ( (LA1_0=='+') ) {
                alt1=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 1, 0, input);

                throw nvae;
            }
            switch (alt1) {
                case 1 :
                    // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:24:8: 'add'
                    {
                    match("add"); 


                    }
                    break;
                case 2 :
                    // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:24:17: '+'
                    {
                    match('+'); 

                    }
                    break;

            }
            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "PLUS"

    // $ANTLR start "SUB"
    public final void mSUB() throws RecognitionException {
        try {
            int _type = SUB;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:25:6: ( 'sub' | '-' )
            int alt2=2;
            int LA2_0 = input.LA(1);

            if ( (LA2_0=='s') ) {
                alt2=1;
            }
            else if ( (LA2_0=='-') ) {
                alt2=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 2, 0, input);

                throw nvae;
            }
            switch (alt2) {
                case 1 :
                    // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:25:8: 'sub'
                    {
                    match("sub"); 


                    }
                    break;
                case 2 :
                    // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:25:17: '-'
                    {
                    match('-'); 

                    }
                    break;

            }
            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "SUB"

    // $ANTLR start "MULT"
    public final void mMULT() throws RecognitionException {
        try {
            int _type = MULT;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:26:6: ( 'mult' | '*' )
            int alt3=2;
            int LA3_0 = input.LA(1);

            if ( (LA3_0=='m') ) {
                alt3=1;
            }
            else if ( (LA3_0=='*') ) {
                alt3=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 3, 0, input);

                throw nvae;
            }
            switch (alt3) {
                case 1 :
                    // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:26:8: 'mult'
                    {
                    match("mult"); 


                    }
                    break;
                case 2 :
                    // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:26:17: '*'
                    {
                    match('*'); 

                    }
                    break;

            }
            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "MULT"

    // $ANTLR start "DIV"
    public final void mDIV() throws RecognitionException {
        try {
            int _type = DIV;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:27:6: ( 'div' | '/' )
            int alt4=2;
            int LA4_0 = input.LA(1);

            if ( (LA4_0=='d') ) {
                alt4=1;
            }
            else if ( (LA4_0=='/') ) {
                alt4=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 4, 0, input);

                throw nvae;
            }
            switch (alt4) {
                case 1 :
                    // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:27:8: 'div'
                    {
                    match("div"); 


                    }
                    break;
                case 2 :
                    // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:27:17: '/'
                    {
                    match('/'); 

                    }
                    break;

            }
            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "DIV"

    // $ANTLR start "NUM"
    public final void mNUM() throws RecognitionException {
        try {
            int _type = NUM;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:28:6: ( ( '0' .. '9' )+ )
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:28:8: ( '0' .. '9' )+
            {
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:28:8: ( '0' .. '9' )+
            int cnt5=0;
            loop5:
            do {
                int alt5=2;
                int LA5_0 = input.LA(1);

                if ( ((LA5_0>='0' && LA5_0<='9')) ) {
                    alt5=1;
                }


                switch (alt5) {
            	case 1 :
            	    // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:28:9: '0' .. '9'
            	    {
            	    matchRange('0','9'); 

            	    }
            	    break;

            	default :
            	    if ( cnt5 >= 1 ) break loop5;
                        EarlyExitException eee =
                            new EarlyExitException(5, input);
                        throw eee;
                }
                cnt5++;
            } while (true);


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "NUM"

    // $ANTLR start "WS"
    public final void mWS() throws RecognitionException {
        try {
            int _type = WS;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:29:4: ( ( ' ' | '\\t' | '\\n' ) )
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:29:6: ( ' ' | '\\t' | '\\n' )
            {
            if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)==' ' ) {
                input.consume();

            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;}

            this.skip();

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "WS"

    public void mTokens() throws RecognitionException {
        // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:1:8: ( T__10 | T__11 | PLUS | SUB | MULT | DIV | NUM | WS )
        int alt6=8;
        switch ( input.LA(1) ) {
        case '(':
            {
            alt6=1;
            }
            break;
        case ')':
            {
            alt6=2;
            }
            break;
        case '+':
        case 'a':
            {
            alt6=3;
            }
            break;
        case '-':
        case 's':
            {
            alt6=4;
            }
            break;
        case '*':
        case 'm':
            {
            alt6=5;
            }
            break;
        case '/':
        case 'd':
            {
            alt6=6;
            }
            break;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':
            {
            alt6=7;
            }
            break;
        case '\t':
        case '\n':
        case ' ':
            {
            alt6=8;
            }
            break;
        default:
            NoViableAltException nvae =
                new NoViableAltException("", 6, 0, input);

            throw nvae;
        }

        switch (alt6) {
            case 1 :
                // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:1:10: T__10
                {
                mT__10(); 

                }
                break;
            case 2 :
                // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:1:16: T__11
                {
                mT__11(); 

                }
                break;
            case 3 :
                // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:1:22: PLUS
                {
                mPLUS(); 

                }
                break;
            case 4 :
                // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:1:27: SUB
                {
                mSUB(); 

                }
                break;
            case 5 :
                // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:1:31: MULT
                {
                mMULT(); 

                }
                break;
            case 6 :
                // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:1:36: DIV
                {
                mDIV(); 

                }
                break;
            case 7 :
                // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:1:40: NUM
                {
                mNUM(); 

                }
                break;
            case 8 :
                // /home/ubuntu/kenpu-teaching/201201/csci4020u/04-prog-lang/src/PL.g:1:44: WS
                {
                mWS(); 

                }
                break;

        }

    }


 

}